// http://192.168.20.5:8080/api/v1/order/search
import httpAxios from "@/utilx/http/axios.ts";
import type {PageResult, Result, SearchById, SearchWithPage} from "@/typex";
import axios from "axios";
import {AxiosResult, cloud} from "@/api/dto";

export namespace OrderApi {
    const routeGroup = "order"
    export const OrderSearch = async (data: SearchWithPage<cloud.OrderReq>): AxiosResult<PageResult<cloud.Order>> => httpAxios.post(routeGroup.concat("/search"), data);
    export const OrderAdd = async (data: any): AxiosResult<Result<boolean>> => httpAxios.post(routeGroup.concat("/add"), data);
    export const OrderUpd = async (data: any): AxiosResult<Result<boolean>> => httpAxios.post(routeGroup.concat("/upd"), data);
    export const OrderGet = async (data: SearchById): AxiosResult<Result<cloud.Order>> => httpAxios.post(routeGroup.concat("/get"), data);
}

